package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;

/**
 * describe:权限表实体类
 *
 * @author Administrator
 * @date 2019/11/19
 * @Time 23:37
 */
@ApiModel(value = "权限表", description = "权限表SysPrivilege")
@Data
@TableName(value = "sys_privilege")
public class SysPrivilege extends BaseEntity<SysPrivilege> {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", name = "privilege_id", example = "32位uuid", required = true)
    @Id
    @Column(name = "privilege_id", length = 20, columnDefinition = "varchar(50) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String privilegeId;
    /**
     * 文件名称
     */
    @ApiModelProperty(value = "权限名称", name = "privilege_name", example = "权限名称", required = true)
    @Column(name = "privilege_name", length = 50, columnDefinition = "varchar(50) COMMENT '权限名称'")
    @NotBlank(message = "权限名称不能为空")
    private String privilegeName;

    @ApiModelProperty(value = "权限类型", name = "privilege_type", example = "权限类型", required = true)
    @Column(name = "privilege_type", length = 50, columnDefinition = "varchar(50) COMMENT '权限类型'")
    @NotBlank(message = "权限类型不能为空")
    private String privilegeType;

    @ApiModelProperty(value = "描述", name = "info", example = "描述", required = true)
    @Column(name = "info", length = 100, columnDefinition = "varchar(100) COMMENT '描述'")
    private String info;

    /**
     * 标记是否删除
     */
    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
